﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace MainApp
{
    public partial class FrmGetStore : DevExpress.XtraEditors.XtraForm
    {
        public FrmGetStore(BindingSource bdsStores)
        {
            InitializeComponent();
            this.bdsStores.DataSource = bdsStores.DataSource;
        }

        public Guid GetStoreID()
        {
            return (Guid)cboStores.EditValue;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        private void cboStores_EditValueChanged(object sender, EventArgs e)
        {
            btnOK.Enabled = true;
            btnOK.Focus();
        }
    }
}